package com.wing.product.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wing.mybatis.common.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 产品入库表
 */
@Schema(description="产品明细表")
@Data
@EqualsAndHashCode(callSuper=true)
@TableName(value = "warehouse_product_inventory")
public class WarehouseProductInventory extends BaseEntity {

    @TableField(value = "warehouse_product_id")
    @Schema(description="产品id 取 warehouse_product表")
    private Long warehouseProductId;

    @TableField(value = "warehouse_type_id")
    @Schema(description="仓库类型ID")
    private Long warehouseTypeId;

    @TableField(value = "warehouse_id")
    @Schema(description="仓库ID")
    private Long warehouseId;

    @TableField(value = "warehouse_area_id")
    @Schema(description="仓库库区ID")
    private Long warehouseAreaId;

    @TableField(value = "warehouse_shelf_id")
    @Schema(description="库区货架ID")
    private Long warehouseShelfId;

    @TableField(value = "warehouse_shelf_space_id")
    @Schema(description="库位ID")
    private Long warehouseShelfSpaceId;

    @TableField(value = "pallet_box_id")
    @Schema(description="料箱ID")
    private Long palletBoxId;

    @TableField(value = "product_status")
    @Schema(description="商品状态 1、发货 2、签收 3、入库 4、出库")
    private Integer productStatus;

    @TableField(value = "customer_id")
    @Schema(description="客户编号（货物归属者）先用warehouse_customer，后用sel_customers_info表")
    private Long customerId;

    @TableField(value = "price")
    @Schema(description="价格  每天多少钱，取当时的托管价格")
    private Double price;

    @TableField(value = "gross_weight")
    @Schema(description="毛重")
    private Double grossWeight;

    @TableField(value = "net_weight")
    @Schema(description="净重")
    private Double netWeight;

    @TableField(value = "warehouse_shipment_order_id")
    @Schema(description="发货单号")
    private Long warehouseShipmentOrderId;

    @TableField(value = "user_bundle_code")
    @Schema(description="用户捆包号")
    private String userBundleCode;

    @TableField(value = "sys_bundle_code")
    @Schema(description="系统捆包号 实际就是code 需要唯一")
    private String sysBundleCode;

    @TableField(value = "first_entry_date")
    @Schema(description="首次入库日期")
    private LocalDateTime firstEntryDate;

    @TableField(value = "quantity")
    @Schema(description="数量")
    private Integer quantity;

    @TableField(value = "source")
    @Schema(description="来源物料系统捆包码")
    private String source;

    @TableField(value = "product_type")
    @Schema(description="类型1.成品，2.余料，3.废料,4.原料")
    private Integer productType;

    @TableField(value = "original_customer_id")
    @Schema(description="原始客户id")
    private Long originalCustomerId;

    @TableField(value = "inventory_type_id")
    @Schema(description="出入库类型id")
    private Long inventoryTypeId;

    private Long warehouseSignOrderId;

    @TableField(value = "warehouse_storage_order_id")
    private Long warehouseStorageOrderId;

    private Long warehouseShipmentOrderDetailId;
    private Long warehouseSignOrderDetailId;

    @TableField(value = "warehouse_storage_order_detail_id")
    private Long warehouseStorageOrderDetailId;

    private Long warehouseOrderId;

    @TableField(value = "is_sign")
    @Schema(description="0未签收1已签收")
    private Integer isSign;


    @Schema(description = "规格")
    @TableField("specifications")
    private String specifications;

    @Schema(description = "开始时间")
    @TableField("start_time")
    private LocalDateTime startTime;

    @Schema(description = "钢种")
    @TableField("warehouse_product_mark")
    private String warehouseProductMark;

    @Schema(description = "备注")
    @TableField("remarks")
    private String remarks;

    @Schema(description = "产地")
    @TableField("warehouse_product_producer")
    private String warehouseProductProducer;

    @Schema(description = "所在库位")
    @TableField("storage_location")
    private String storageLocation;

    @Schema(description = "第三方库位")
    @TableField("third_party_location")
    private String thirdPartyLocation;

    @Schema(description = "品种")
    @TableField("warehouse_product_variety")
    private String warehouseProductVariety;

    @Schema(description = "入库单号(第三方入库单号)")
    @TableField("inbound_order_number")
    private String inboundOrderNumber;

    @Schema(description = "货物类型")
    @TableField("goods_type")
    private String goodsType;

    @Schema(description = "规格厚度")
    @TableField("spec_thickness")
    private String specThickness;

    @Schema(description = "规格宽度")
    @TableField("spec_width")
    private String specWidth;

    @Schema(description = "规格长度")
    @TableField("spec_length")
    private String specLength;

    @Schema(description = "磅重")
    @TableField("pound_weight")
    private String poundWeight;

    @Schema(description = "包装方式")
    @TableField("packaging_method")
    private String packagingMethod;

    @Schema(description = "原料管理号")
    @TableField("material_management_number")
    private String materialManagementNumber;

    @Schema(description = "入库方式")
    @TableField("inbound_method")
    private String inboundMethod;

    @Schema(description = "材质")
    @TableField("product_material_category")
    private String productMaterialCategory;

    @Schema(description = "客户入库日期")
    @TableField("customer_inbound_date")
    private LocalDateTime customerInboundDate;

    @Schema(description = "可供重量")
    @TableField("available_weight")
    private String availableWeight;

    @Schema(description = "可供件数")
    @TableField("available_quantity")
    private String availableQuantity;

    @Schema(description = "标签打印")
    @TableField("label_printed")
    private String labelPrinted;

    @Schema(description = "密度")
    @TableField("density")
    private BigDecimal density;

    @Schema(description = "开始计费时间")
    @TableField("billing_start_time")
    private LocalDateTime billingStartTime;

    @Schema(description = "生产商id pro_product_producer")
    @TableField("product_producer_id")
    private Integer product_producer_id;

    @Schema(description = "产品品牌 取 pro_product_brand表")
    @TableField("product_brand_id")
    private Integer product_brand_id;

    @TableField(value = "product_main_unit_id")
    @Schema(description="主单位")
    private Long productMainUnitId;

    @TableField(value = "sign_qualified")
    @Schema(description="签收是否合格")
    private Long signQualified;

    @TableField(value = "is_review")
    @Schema(description="是否复核")
    private Long isReview;

    @TableField(value = "review_time")
    @Schema(description="复核时间，计价时间")
    private LocalDateTime reviewTime;

    @TableField(value = "unqualified_id")
    @Schema(description="不合格id")
    private Long unqualifiedId;

    @Schema(description = "不合格原因照片")
    @TableField("unqualified_reason")
    private String unqualifiedReason;

}